﻿using System;
using System.Drawing;
using System.Windows.Forms;

namespace YArchitech.LIB.YJKControls
{
	public class YJKGroupBoxBlackSide : GroupBox
	{
		protected override void OnPaint(PaintEventArgs e)
		{
			int num = 1;
			int num2 = 7;
			int num3 = 0;
			int num4 = 4;
			int num5 = num;
			int num6 = 3;
			int num7 = num6 + num;
			int num8 = num7 + num4 + num3;
			int num9 = (int)e.Graphics.MeasureString(this.Text, this.Font).Width;
			e.Graphics.DrawString(this.Text, this.Font, Brushes.Black, (float)num8, (float)num5);
			e.Graphics.DrawLine(Pens.Black, num7, num2, num7 + num4, num2);
			e.Graphics.DrawLine(Pens.Black, num9 + num8 + num3 - num * 2, num2, base.Width - num7, num2);
			e.Graphics.DrawLine(Pens.Black, num, num2 + num6, num, base.Height - num6);
			e.Graphics.DrawLine(Pens.Black, base.Width - num, num2 + num6, base.Width - num, base.Height - num6);
			e.Graphics.DrawLine(Pens.Black, num7, base.Height - num, base.Width - num7, base.Height - num);
			int num10 = num6 * 2;
			System.Drawing.Rectangle rect = new System.Drawing.Rectangle(num, num2, num10, num10);
			System.Drawing.Rectangle rect2 = new System.Drawing.Rectangle(base.Width - num - num10, num2, num10, num10);
			System.Drawing.Rectangle rect3 = new System.Drawing.Rectangle(num, base.Height - num - num10, num10, num10);
			System.Drawing.Rectangle rect4 = new System.Drawing.Rectangle(base.Width - num - num10, base.Height - num - num10, num10, num10);
			e.Graphics.DrawArc(Pens.Black, rect, 180f, 90f);
			e.Graphics.DrawArc(Pens.Black, rect2, 270f, 90f);
			e.Graphics.DrawArc(Pens.Black, rect3, 90f, 90f);
			e.Graphics.DrawArc(Pens.Black, rect4, 0f, 90f);
		}
	}
}
